<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>至本电商 - 登录</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
    <div class="login-container">
        <div class="login-box">
            <div class="login-header">
                <h1>至本电商客服系统</h1>
                <p>请登录或注册以继续</p>
            </div>

            <div class="tabs">
                <button class="tab-btn active" data-tab="login">登录</button>
                <button class="tab-btn" data-tab="register">注册</button>
            </div>

            <div class="tab-content" id="login-content">
                <form id="login-form">
                    <div class="form-group">
                        <label for="login-userid">用户ID</label>
                        <div class="input-icon">
                            <i class="fas fa-user"></i>
                            <input type="text" id="login-userid" name="user_id" required>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="login-password">密码</label>
                        <div class="input-icon">
                            <i class="fas fa-lock"></i>
                            <input type="password" id="login-password" name="password" required>
                        </div>
                    </div>

                    <button type="submit" class="btn-primary">登录</button>

                    <div class="form-message" id="login-message"></div>
                </form>
            </div>

            <div class="tab-content" id="register-content" style="display: none;">
                <form id="register-form">
                    <div class="form-group">
                        <label for="register-userid">用户ID</label>
                        <div class="input-icon">
                            <i class="fas fa-user-plus"></i>
                            <input type="text" id="register-userid" name="user_id" required>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="register-password">密码</label>
                        <div class="input-icon">
                            <i class="fas fa-lock"></i>
                            <input type="password" id="register-password" name="password" required>
                        </div>
                    </div>

                    <button type="submit" class="btn-primary">注册</button>

                    <div class="form-message" id="register-message"></div>
                </form>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/login.js') }}"></script>
</body>
</html>
